package backstage.app.service.impl.util;

 
import org.springframework.stereotype.Component;

import backstage.app.entity.NoConstitution;

@Component
public class NoConstitutionImplUtil {

	
	//3-6 岁幼儿测试
		public NoConstitution getConstitution1(NoConstitution constitution) {
			
			//身高
			if(constitution.getHeight()<=36) {
				constitution.setHeightRemake("仍需努力");
			}else if(constitution.getHeight()>36&&constitution.getHeight()<=72) {
				constitution.setHeightRemake("合格");
			}else if(constitution.getHeight()>72&&constitution.getHeight()<=108) {
				constitution.setHeightRemake("良好");
			}else if(constitution.getHeight()>108&&constitution.getHeight()<=144||constitution.getHeight()>144) {
				constitution.setHeightRemake("优秀");
			}
			
			
			 
		 
			 //体重
			if(constitution.getWeight()<=10) {
				constitution.setWeightRemake("偏瘦");
			}else if(constitution.getWeight()>10 && constitution.getWeight()<=15) {
				constitution.setWeightRemake("正常");
			}else if(constitution.getWeight()>15 && constitution.getWeight()<=20) {
				constitution.setWeightRemake("偏肥");
			}else if(constitution.getWeight()>20 && constitution.getWeight()<=25||constitution.getWeight()>25) {
				constitution.setWeightRemake("肥胖");
			} 
			
			
			//坐位体前屈
		 
			 
			if(constitution.getAbduction()<=4) {
					constitution.setAbductionRemake("仍需努力");
			}else if(constitution.getAbduction()>4&& constitution.getAbduction()<=8) {
				constitution.setAbductionRemake("合格");
			}else if(constitution.getAbduction()>8&& constitution.getAbduction()<=12||constitution.getAbduction()>12) {
				constitution.setAbductionRemake("良好");
			} 
				
			
			//立定跳远
			 
			if(constitution.getSingForward()<=24) {
				constitution.setSingForwardRemake("仍需努力");
			}else if(constitution.getSingForward()>24&&constitution.getSingForward()<=48) {
				constitution.setSingForwardRemake("合格");
			}else if(constitution.getSingForward()>48&&constitution.getSingForward()<=72) {
				constitution.setSingForwardRemake("良好");
			}else if(constitution.getSingForward()>72&&constitution.getSingForward()<=96||constitution.getSingForward()>96) {
				constitution.setSingForwardRemake("优秀");
			}
			 
			
			//双脚连续跳
		 
			if(constitution.getFingerSpan()==1) {
				constitution.setFingerSpanRemake("仍需努力");
			}else if(constitution.getFingerSpan()==2) {
				constitution.setFingerSpanRemake("合格");
			}else if(constitution.getFingerSpan()==3) {
				constitution.setFingerSpanRemake("良好");
			}else  if(constitution.getFingerSpan()==4||constitution.getFingerSpan()>4){
				constitution.setFingerSpanRemake("优秀");
			}
			 	
			
			//10 米折返跑
			if(constitution.getRoundTrip()<=2.5) {
				constitution.setRoundTripRemake("仍需努力");
			}else if(constitution.getRoundTrip()>2.5&&constitution.getRoundTrip()<=4.5) {
				constitution.setRoundTripRemake("合格");
			}else if(constitution.getRoundTrip()>4.5&&constitution.getRoundTrip()<=7.5) {
				constitution.setRoundTripRemake("良好");
			}else if(constitution.getRoundTrip()>7.5&&constitution.getRoundTrip()<=9.5||constitution.getRoundTrip()>9.5) {
				constitution.setRoundTripRemake("优秀");
			}
			 	
			
			//网球掷远 
			if(constitution.getCourtSprint() <1.5) {
				constitution.setCourtSprintRemake("仍需努力");
			}else if(constitution.getCourtSprint()>1.5&&constitution.getCourtSprint()<=4.5) {
				constitution.setCourtSprintRemake("合格");
			}else if(constitution.getCourtSprint()>4.5&&constitution.getCourtSprint()<=8.5) {
				constitution.setCourtSprintRemake("良好");
			}else if(constitution.getCourtSprint()>8.5&&constitution.getCourtSprint()<=11.5||constitution.getCourtSprint()>11.5) {
				constitution.setCourtSprintRemake("优秀");
			} 
				
			//走平衡木
			if(constitution.getRestrtedArea()<=2) {
				constitution.setRestrtedAreaRemake("仍需努力");
			}else if(constitution.getRestrtedArea()>2&& constitution.getRestrtedArea()<=4) {
				constitution.setRestrtedAreaRemake("合格");
			}else if(constitution.getRestrtedArea()>4&& constitution.getRestrtedArea()<=6) {
				constitution.setRestrtedAreaRemake("良好");
			}else if(constitution.getRestrtedArea()>6&& constitution.getRestrtedArea()<=8||constitution.getRestrtedArea()>8) {
				constitution.setRestrtedAreaRemake("优秀");
			}
		 
			return constitution;
		}
}
